package spec.ocl_mcg;

import graph.mcg.CGNode;
import graph.mcg.ConstraintNode;

import org.eclipse.ocl.ecore.CallOperationAction;
import org.eclipse.ocl.ecore.SendSignalAction;


public class MessageExpNode extends TreeNode{
	
	private TreeNode node_target;
	private TreeNode node_argument;
	private CallOperationAction node_calledOperation;
	private SendSignalAction node_sentSignal;
	
	public TreeNode getNode_target() {
		return node_target;
	}

	public void setNode_target(TreeNode nodeTarget) {
		node_target = nodeTarget;
	}

	public TreeNode getNode_argument() {
		return node_argument;
	}

	public void setNode_argument(TreeNode nodeArgument) {
		node_argument = nodeArgument;
	}

	public CallOperationAction getNode_calledOperation() {
		return node_calledOperation;
	}

	public void setNode_calledOperation(TreeNode nodeCalledOperation) {
		node_calledOperation = (CallOperationAction)nodeCalledOperation;
	}

	public SendSignalAction getNode_sentSignal() {
		return node_sentSignal;
	}

	public void setNode_sentSignal(TreeNode nodeSentSignal) {
		node_sentSignal =(SendSignalAction)nodeSentSignal;
	}

	@Override
	public CGNode toCG() {
		ConstraintNode cfgnode = new ConstraintNode(this);
//		System.out.println("LET_IN_CG_NODE:"+node_in.getExpresult());
		
		cfgnode.setConstraint(node_target.getExpresult());
		cfgnode.setNextnode(null);
		return cfgnode;
		// TODO Auto-generated method stub
//		return null;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}
	 
}
